package com.example.testgit.controller;

import com.example.testgit.VO.*;
import com.example.testgit.service.SecondClassroomService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/second")
public class SecondClassroomController {

    @Resource
    private SecondClassroomService secondClassroomService;

    @PostMapping("/activity")
    public Result<PageResult<ActivityVO>> queryActivity(@RequestBody StudentQuery stu) {
        PageResult<ActivityVO> result = secondClassroomService.queryActivity(stu);
        return Result.success(result);
    }

    @PostMapping("/deepCoach")
    public Result<PageResult<DeepCoachVO>> queryDeepCoach(@RequestBody StudentQuery stu) {
        PageResult<DeepCoachVO> result = secondClassroomService.queryDeepCoach(stu);
        return Result.success(result);
    }

}
